import request from  '@/utils/request.js'
// 获取分类列表
export const getItemTypesService = () => {
    return request.get('/admin/itemType')
}

// 添加分类
export const addItemTypeService = (itemType) => {
    return request.post('/admin/itemType/add', itemType)
}

// 更新分类
export const updateItemTypeService = (itemType) => {
    return request.put('/admin/itemType/update', itemType)
}

// 删除分类
export const deleteItemTypeService = (id) => {
    return request.delete('/admin/itemType/delete', { params: { id } })
}

// 更新分类状态
export const updateItemTypeStatusService = (id, status) => {
    return request.patch('/admin/itemType/status', null, { params: { id, status } })
}